/*
 * Performance Test 1
 * To test performance of the compiler.
 */
int pantograph = 1;
const double shihudang = 64.520, songjiang = 64.120;

int K1806(int command_code, double speed)
{
	double k1806 = 70.000;
	double speed_kmps;
	speed_kmps = speed;
	speed_kmps = speed_kmps / 3600.0;
	int time = 0;

	if (command_code == 75038 && speed_kmps > 0.0)
	{
		while (k1806 > shihudang)
		{
			k1806 = k1806 - speed_kmps;
			time = time + 1;
		}
		// Pantograph lowering operation!
		pantograph = 0;
		while (k1806 > songjiang)
		{
			k1806 = k1806 - speed_kmps;
			time = time + 1;
			/*
			 * As the pantograph is lowered, the speed of the train
			 * is reduced by 0.1 m/s every second.
			 */
			if (speed_kmps > 1.0e-4)
				speed_kmps = speed_kmps - 1.0e-4;
		}
		pantograph = 1;
	}
	else
		time = -1;
	return time;
}

int main()
{
	int command_code;
	double speed;
	int time;
	command_code = get_int();
	speed = get_double();
	time = K1806(command_code, speed);
	print_int(time);
	return 0;
}